import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'

export default class MyNavLink extends Component {
    render() {
        const { to, title } = this.props
        return (
             //  <NavLink activeClassName="aboutActive" className="list-group-item" to={to}>{title}</NavLink>
             <NavLink activeClassName="aboutActive" className="list-group-item" {...this.props}></NavLink>
             //通过 props.children可接收到标签体内容，即<NavLink activeClassName="aboutActive" className="list-group-item" {...this.props}>{this.props.children}</NavLink>
        )
    }
}
